<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

namespace Common\Model;

use Think\Model;

/**
 * Description of BusinessInfoModel
 *
 * @author Administrator
 */
class BusinessInfoModel extends Model {
        //表单自动验证 
    protected $_validate = array(
        array('sname', 'require', '门点名不能为空'),
        array('linkman', 'require', '联系人不能为空'),
        array('linktel', 'require', '联系电话不能为空'),
        array('linktel', 'require', '联系电话不能为空'),
         array('address', 'require', '详细地址不能为空'),
         array('content', 'require', '服务内容不能为空'),
         array('rate', 'require', '频次不能为空'),
        
    );
    //关联查询
    protected $_link = array(
        'business' => array(
            'mapping_type' => self::BELONGS_TO,
            'class_name' => 'business',
            'foreign_key' => 'bus_id',
        )
    );
}
